define(["Zepto", 
        "underscore", 
        "Backbone", 
        "Handlebars",  
        "text!templates/teacher/course-item-teacher.html" 
], function($, _, Backbone, Handlebars, template) {
	
    var CourseItemView = Backbone.View.extend({

        template: Handlebars.compile(template),

        initialize: function() {
            this.model.bind("change", this.render, this);
            this.model.bind("destroy", this.close, this);
        },

        render: function(eventName) {
        
        	//alert('lenitem: ' + this.model.get('nome'));
            $(this.el).html(this.template(this.model.toJSON()));
            return this;
        }
    });


    return CourseItemView;

});

